package be.bonamis.umpire.quiz;

import java.util.ArrayList;
import java.util.List;

public class CreateResponses {

	public static IndividualResult goodResponses_4On4() {
		IndividualResult result = new IndividualResult();
		List<Boolean> responses = new ArrayList<Boolean>();
		responses.add(false);
		responses.add(true);
		responses.add(false);
		responses.add(false);

		responses.add(false);
		responses.add(false);
		responses.add(true);
		responses.add(false);

		responses.add(true);
		responses.add(false);
		responses.add(false);
		responses.add(false);

		responses.add(true);
		responses.add(true);
		responses.add(false);
		responses.add(false);

		ResponseStyle[] styles = new ResponseStyle[responses.size()];
		styles[1] = ResponseStyle.RIGHT;
		styles[6] = ResponseStyle.RIGHT;
		styles[8] = ResponseStyle.RIGHT;
		styles[12] = ResponseStyle.RIGHT;
		styles[13] = ResponseStyle.RIGHT;

		result.setResponses(responses);
		result.setStyles(styles);
		return result;
	}

	public static IndividualResult goodAndWrongResponses_3On4() {
		IndividualResult result = new IndividualResult();
		List<Boolean> responses = new ArrayList<Boolean>();
		responses.add(false);
		responses.add(true);
		responses.add(false);
		responses.add(false);

		responses.add(true); // wrong
		responses.add(false);
		responses.add(true);
		responses.add(false);

		responses.add(true);
		responses.add(false);
		responses.add(false);
		responses.add(false);

		responses.add(true);
		responses.add(true);
		responses.add(false);
		responses.add(false);

		result.setResponses(responses);

		return result;
	}

	public static IndividualResult goodAndWrongResponses_2On4() {
		IndividualResult result = new IndividualResult();
		List<Boolean> responses = new ArrayList<Boolean>();
		responses.add(true); // wrong
		responses.add(true);
		responses.add(false);
		responses.add(false);

		responses.add(true); // wrong
		responses.add(false);
		responses.add(true);
		responses.add(false);

		responses.add(true);
		responses.add(false);
		responses.add(false);
		responses.add(false);

		responses.add(true);
		responses.add(true);
		responses.add(false);
		responses.add(false);

		ResponseStyle[] styles = new ResponseStyle[responses.size()];
		styles[0] = ResponseStyle.WRONG;
		styles[1] = ResponseStyle.RIGHT;
		styles[4] = ResponseStyle.WRONG;
		styles[6] = ResponseStyle.RIGHT;
		styles[8] = ResponseStyle.RIGHT;
		styles[12] = ResponseStyle.RIGHT;
		styles[13] = ResponseStyle.RIGHT;

		result.setResponses(responses);
		result.setStyles(styles);
		return result;
	}
	
	public static IndividualResult goodAndWrongResponses_1On4() {
		IndividualResult result = new IndividualResult();
		List<Boolean> responses = new ArrayList<Boolean>();
		responses.add(true); // wrong
		responses.add(true);
		responses.add(false);
		responses.add(false);

		responses.add(true); // wrong
		responses.add(false);
		responses.add(true);
		responses.add(false);

		responses.add(true);
		responses.add(false);
		responses.add(false);
		responses.add(false);

		responses.add(false);// wrong
		responses.add(true);
		responses.add(false);
		responses.add(false);
		
		result.setResponses(responses);		
		return result;
	}

	public static IndividualResult wrongResponses_0On4() {
		List<Boolean> responses = new ArrayList<Boolean>();
		IndividualResult result = new IndividualResult();
		responses.add(false);
		responses.add(true);
		responses.add(false);
		responses.add(true);

		responses.add(false);
		responses.add(false);
		responses.add(true);
		responses.add(true);

		responses.add(true);
		responses.add(false);
		responses.add(false);
		responses.add(true);

		responses.add(true);
		responses.add(true);
		responses.add(false);
		responses.add(true);
		result.setResponses(responses);
		// result.setStyles(styles);
		return result;
	}

}
